home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
os2
/
unz520d2.zip
/
unzip.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-04-20
|
12KB
|
421 lines
/*---------------------------------------------------------------------------
unzip.h (new)
This header file contains the public macros and typedefs required by
both the UnZip sources and by any application using the UnZip API. If
UNZIP_INTERNAL is defined, it includes unzpriv.h (containing includes,
prototypes and extern variables used by the actual UnZip sources).
---------------------------------------------------------------------------*/
#ifndef __unzip_h /* prevent multiple inclusions */
#define __unzip_h
/*****************************************/
/* Predefined, Machine-specific Macros */
/*****************************************/
#ifdef __GO32__ /* MS-DOS extender: NOT Unix */
# ifdef unix
# undef unix
# endif
# ifdef __unix
# undef __unix
# endif
# ifdef __unix__
# undef __unix__
# endif
#endif
#if ((defined(__convex__) || defined(__convexc__)) && !defined(CONVEX))
# define CONVEX
#endif
#if (defined(unix) || defined(__unix) || defined(__unix__))
# ifndef UNIX
# define UNIX
# endif
#endif /* unix || __unix || __unix__ */
#if (defined(M_XENIX) || defined(COHERENT) || defined(__hpux))
# ifndef UNIX
# define UNIX
# endif
#endif /* M_XENIX || COHERENT || __hpux */
#if (defined(CONVEX) || defined(MINIX) || defined(_AIX) || defined(__QNX__))
# ifndef UNIX
# define UNIX
# endif
#endif /* CONVEX || MINIX || _AIX || __QNX__ */
#if (defined(VM_CMS) || defined(MVS))
# define CMS_MVS
#endif
#if (defined(__OS2__) && !defined(OS2))
# define OS2
#endif
#if (defined(__VMS) && !defined(VMS))
# define VMS
#endif
#if (defined(__WIN32__) && !defined(WIN32))
# define WIN32
#endif
#ifdef __COMPILER_KCC__
# include <c-env.h>
# ifdef SYS_T20
# define TOPS20
# endif
#endif /* __COMPILER_KCC__ */
/* Borland C does not define __TURBOC__ if compiling for a 32 bit platform */
#ifdef __BORLANDC__
# ifndef __TURBOC__
# define __TURBOC__
# endif
# if (!defined(__MSDOS__) && !defined(OS2) && !defined(WIN32))
# define __MSDOS__
# endif
#endif
/* define MSDOS for Turbo C (unless OS/2) and Power C as well as Microsoft C */
#ifdef __POWERC
# define __TURBOC__
# define MSDOS
#endif /* __POWERC */
#if (defined(__MSDOS__) && !defined(MSDOS)) /* just to make sure */
# define MSDOS
#endif
#if (defined(linux) && !defined(LINUX))
# define LINUX
#endif
#ifdef __arm
# define RISCOS
#endif
/* use prototypes and ANSI libraries if __STDC__, or Microsoft or Borland C, or
* Silicon Graphics, or Convex?, or IBM C Set/2, or GNU gcc/emx, or Watcom C,
* or Macintosh, or Windows NT, or Sequent, or Atari or IBM RS/6000.
*/
#if (defined(__STDC__) || defined(MSDOS) || defined(sgi) || defined(RISCOS))
# ifndef PROTO
# define PROTO
# endif
# ifndef MODERN
# define MODERN
# endif
#endif
#if (defined(__IBMC__) || defined(__EMX__) || defined(__WATCOMC__))
# ifndef PROTO
# define PROTO
# endif
# ifndef MODERN
# define MODERN
# endif
#endif
#if (defined(THINK_C) || defined(MPW) || defined(WIN32) || defined(_SEQUENT_))
# ifndef PTX /* Sequent running Dynix/ptx: non-modern compiler */
# ifndef PROTO
# define PROTO
# endif
# ifndef MODERN
# define MODERN
# endif
# endif
#endif
#if (defined(ATARI_ST) || defined(__BORLANDC__)) /* || defined(CONVEX) */
# ifndef PROTO
# define PROTO
# endif
# ifndef MODERN
# define MODERN
# endif
#endif
#if (defined(_AIX) || defined(CMS_MVS))
# ifndef PROTO
# define PROTO
# endif
# ifndef MODERN
# define MODERN
# endif
#endif
/* turn off prototypes if requested */
#if (defined(NOPROTO) && defined(PROTO))
# undef PROTO
#endif
/* used to remove arguments in function prototypes for non-ANSI C */
#ifdef PROTO
# define OF(a) a
#else
# define OF(a) ()
#endif
/* Be cautious and disable the "const" keyword if in doubt. */
#if (!defined(MODERN) && !defined(NO_CONST))
# define NO_CONST
#endif /* !MODERN && !NO_CONST */
/* Avoid using const if compiler does not support it */
#ifdef NO_CONST
# ifdef const
# undef const
# endif
# define const
#endif
/* bad or (occasionally?) missing stddef.h: */
#if (defined(M_XENIX) || defined(DNIX))
# define NO_STDDEF_H
#endif
#if (defined(M_XENIX) && !defined(M_UNIX)) /* SCO Xenix only, not SCO Unix */
# define NO_LIMITS_H /* no limits.h, but MODERN defined */
# define NO_UID_GID /* no uid_t/gid_t */
#endif
#ifdef realix /* Modcomp Real/IX, real-time SysV.3 variant */
# define SYSV
# define NO_UID_GID /* no uid_t/gid_t */
#endif
#if (defined(_AIX) && !defined(_ALL_SOURCE))
# define _ALL_SOURCE
#endif
#if defined(apollo) /* defines __STDC__ */
# define NO_STDLIB_H
#endif
#ifdef DNIX
# define SYSV
# define SHORT_NAMES /* 14-char limitation on path components */
/* # define FILENAME_MAX 14 */
# define FILENAME_MAX NAME_MAX /* GRR: experiment */
#endif
#if (defined(SYSTEM_FIVE) || defined(__SYSTEM_FIVE))
# ifndef SYSV
# define SYSV
# endif
#endif /* SYSTEM_FIVE || __SYSTEM_FIVE */
#if (defined(M_SYSV) || defined(M_SYS5))
# ifndef SYSV
# define SYSV
# endif
#endif /* M_SYSV || M_SYS5 */
/* __SVR4 and __svr4__ catch Solaris on at least some combos of compiler+OS */
#if (defined(__SVR4) || defined(__svr4__) || defined(sgi) || defined(__hpux))
# ifndef SYSV
# define SYSV
# endif
#endif /* __SVR4 || __svr4__ || sgi || __hpux */
#if (defined(LINUX) || defined(__QNX__))
# ifndef SYSV
# define SYSV
# endif
#endif /* LINUX || __QNX__ */
#if (defined(ultrix) || defined(__ultrix) || defined(bsd4_2))
# if (!defined(BSD) && !defined(SYSV))
# define BSD
# endif
#endif /* ultrix || __ultrix || bsd4_2 */
#if (defined(sun) || defined(pyr) || defined(CONVEX))
# if (!defined(BSD) && !defined(SYSV))
# define BSD
# endif
#endif /* sun || pyr || CONVEX */
#ifdef pyr /* Pyramid: has BSD and AT&T "universes" */
# ifdef BSD
# define pyr_bsd
# define USE_STRINGS_H /* instead of more common string.h */
# define ZMEM /* ZMEM now uses bcopy/bzero: not in AT&T universe */
# endif /* (AT&T memcpy claimed to be very slow, though) */
# define DECLARE_ERRNO
#endif /* pyr */
/* stat() bug for Borland, Watcom, VAX C (also GNU?), and Atari ST MiNT on
* TOS filesystems: returns 0 for wildcards! (returns 0xffffffff on Minix
* filesystem or `U:' drive under Atari MiNT) */
#if (defined(__TURBOC__) || defined(__WATCOMC__) || defined(VMS))
# define WILD_STAT_BUG
#endif
#if (defined(__MINT__))
# define WILD_STAT_BUG
#endif
#ifdef WILD_STAT_BUG
# define SSTAT(path,pbuf) (iswild(path) || stat(path,pbuf))
#else
# define SSTAT stat
#endif
#ifdef REGULUS /* returns the inode number on success(!)...argh argh argh */
# define stat(p,s) zstat(p,s)
#endif
#define STRNICMP zstrnicmp
/***************************/
/* OS-Dependent Includes */
/***************************/
#ifdef EFT
# define LONGINT off_t /* Amdahl UTS nonsense ("extended file types") */
#else
# define LONGINT long
#endif
#ifdef MODERN
# ifndef NO_STDDEF_H
# include <stddef.h>
# endif
# ifndef NO_STDLIB_H
# include <stdlib.h> /* standard library prototypes, malloc(), etc. */
# endif
typedef size_t extent;
typedef void zvoid;
#else /* !MODERN */
# ifndef AOS_VS /* mostly modern? */
# ifndef CMS_MVS
LONGINT lseek();
# endif
# ifdef VAXC /* not fully modern, but does have stdlib.h and void */
# include <stdlib.h>
# else
char *malloc();
# define void int
# endif /* ?VAXC */
# endif /* !AOS_VS */
typedef unsigned int extent;
typedef char zvoid;
#endif /* ?MODERN */
typedef unsigned char uch; /* code assumes unsigned bytes; these type- */
typedef unsigned short ush; /* defs replace byte/UWORD/ULONG (which are */
typedef unsigned long ulg; /* predefined on some systems) & match